PARAMS = -lpthread -I../gtest/include
OBJS = instance.o constructive.o chronometer.o solution.o
TESTS = instance_test.o
MAIN = main.cc
MAIN_TEST = tests/main_test.cc
PROG = run
PROG_TEST = tests/test

all: $(OBJS)
	g++ $(PARAMS) $(OBJS) -o $(PROG) $(MAIN)
test: $(TESTS)
	g++ $(PARAMS) $(OBJS) $(TESTS) -o $(PROG_TEST) $(MAIN_TEST)
%.o: %.cc
	g++ $(PARAMS) -o $@ -c $^
clean:
	rm -rf *.o $(PROG_TEST) $(PROG)
solve:
	touch outputs/_candidate
	rm outputs/*_candidate*
	cd solver; ./exeCarSeq
	cat outputs/*_candidate* | grep "Total number of violations"
